package com.dd.cloud.user.service.chknowl.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dd.cloud.user.entity.chknowl.ChkonwlChDrugsTropism;
import com.dd.cloud.user.mapper.chknowl.ChkonwlChDrugsTropismMapper;
import com.dd.cloud.user.service.chknowl.IChkonwlChDrugsTropismService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 药品性味归经表(先设固定值) 服务实现类
 * </p>
 *
 * @author czg
 * @since 2023-10-16
 */
@Service
public class ChkonwlChDrugsTropismServiceImpl extends ServiceImpl<ChkonwlChDrugsTropismMapper, ChkonwlChDrugsTropism> implements IChkonwlChDrugsTropismService {

    @Override
    public List<ChkonwlChDrugsTropism> queryTropismList() {
        LambdaQueryWrapper<ChkonwlChDrugsTropism> wrapper = new LambdaQueryWrapper<>();
        wrapper.orderByAsc(ChkonwlChDrugsTropism::getType,
                        ChkonwlChDrugsTropism::getSort,
                        ChkonwlChDrugsTropism::getCreateDate)
                .eq(ChkonwlChDrugsTropism::getStatus, 1);
        return this.list(wrapper);
    }
}
